#!/usr/bin/env python3

import os, sys

def main(n):
    n = int(n) + 1
    l = [x for x in range(n)]
    i = 2
    while i < n:
        if i in l:
            #print("\t{0}".format(l[i+i::i]))
            l[i + i::i] = [0] * len(l[i+i::i])
        i += 1
    while 0 in l:
        l.remove(0)
    print(l, len(l), sep="\n")
    assert l[0] == 1, "Hello?"
    Rs = [(0, 100), (100, 200), (200, 300), (0, 500), (500, 1000), (0, 10000), (10000, 20000)]
    for R in Rs:
        low = R[0]
        high = R[1]
        count = 0
        for el in l:
            if el >= low and el <= high:
                count += 1
            elif el > high:
                break
        print("{0:7d}:{1:<7d}\t{2:d}".format(low, high, count))

if __name__ == "__main__":
    main(sys.argv[1])
